Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add BorshSchema implementation for core::num::NonZero... integers #214

Merged
merged 4 commits into from
Sep 12, 2023

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Sep 8, 2023

appears to be continuation of #66

@dj8yfo dj8yfo marked this pull request as draft September 9, 2023 17:07
@mina86 mina86 marked this pull request as ready for review September 9, 2023 17:24
@dj8yfo dj8yfo changed the title Add BorshSchema implementation for non-zero integers feat: Add BorshSchema implementation for non-zero integers Sep 11, 2023
impl_for_renamed_primitives!(core::num::NonZeroU32: u32);
impl_for_renamed_primitives!(core::num::NonZeroU64: u64);
impl_for_renamed_primitives!(core::num::NonZeroU128: u128);
impl_for_renamed_primitives!(core::num::NonZeroUsize: usize);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

        test_ok::<usize>(8);
        test_err::<core::num::NonZeroUsize>(MaxSizeError::MissingDefinition);

@dj8yfo dj8yfo self-requested a review September 12, 2023 13:22
@dj8yfo dj8yfo changed the title feat: Add BorshSchema implementation for non-zero integers feat: add BorshSchema implementation for core::num::NonZero... integers Sep 12, 2023
@dj8yfo dj8yfo merged commit c4e8f14 into near:master Sep 12, 2023
7 checks passed
@frol frol mentioned this pull request Sep 12, 2023
@mina86 mina86 deleted the d branch September 12, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants